

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Pergunta List</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="create" action="create">New Pergunta</g:link></span>
        </div>
        <div class="body">
            <h1>Itens Avaliacao</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                   	        <g:sortableColumn property="descricao" title="Perguntas" />
                        
                   	        <th>Respostas</th>
                   	    
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${perguntaList}" status="i" var="pergunta">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td><g:link action="show" id="${pergunta.id}">${fieldValue(bean:pergunta, field:'descricao')}</g:link></td>
                           <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="estado">Resposta:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:registroDeAvaliacao,field:'resp','errors')}">
                                    <g:select  from="${RespostaEnum?.values()}" value="${registroDeAvaliacao?.resp}" name="resp" ></g:select>
                                </td>
                            </tr>
                           
                           
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>


                <div class="buttons">
                    <span class="button"><input class="save" type="submit" value="Cadastrar" /></span>
               
                
                    <span class="button"><a class="home" href="${createLinkTo(dir:'')}">Cancelar</a></span>
                </div>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${Pergunta.count()}" />
            </div>
        </div>
    </body>
</html>
